//
//  RYQuerenQuanCell.swift
//  SheYangBigData
//
//  Created by 宋海胜 on 2021/1/13.
//  Copyright © 2021 叁拾叁. All rights reserved.
//

import UIKit

class RYQuerenQuanCell: SYBaseCell {
    
    var bgView: UIView = {
        let v: UIView = UIView()
        v.backgroundColor = .white
        v.layer.cornerRadius = 5
        v.layer.masksToBounds = true
        return v
    }()

    let quan: UIImageView = {
        let v: UIImageView = UIImageView()
        v.image = UIImage(named: "youhuiquan")
        return v
    }()
    
    let arrow: UIImageView = {
        let v: UIImageView = UIImageView()
        v.image = UIImage(named: "arrow")
        return v
    }()
    
    let title: UILabel = {
        let v:UILabel = UILabel()
        v.textColor = UIColor(hex: 0x333333)
        v.font = 15.autoFontSize()
        v.text = "优惠券"
        
        return v
    }()
    
    let content: UILabel = {
        let v:UILabel = UILabel()
        v.textColor = UIColor(hex: 0xA6A6A6)
        v.font = 14.autoFontSize()
        v.text = "暂无可用优惠券"
        
        return v
    }()
    
    override func initViews() {
        
        self.backgroundColor = Constant.bgViewColor
        
        addSubview(bgView)
        
        bgView.addSubview(quan)
        bgView.addSubview(arrow)
        bgView.addSubview(title)
        bgView.addSubview(content)
        bgView.snp.makeConstraints { (make) in
            make.top.equalToSuperview().offset(15.autoWidth())
            make.bottom.equalToSuperview()
            make.left.equalToSuperview().offset(15.autoWidth())
            make.right.equalToSuperview().offset(-15.autoWidth())
        }
        quan.snp.makeConstraints { (make) in
            make.left.equalToSuperview().offset(10)
            make.centerY.equalToSuperview()
            make.width.equalTo(21.autoWidth())
            make.height.equalTo(18.autoWidth())
            make.top.equalToSuperview().offset(13.autoWidth())
            make.bottom.equalToSuperview().offset(-13.autoWidth())
        }
        arrow.snp.makeConstraints { (make) in
            make.right.equalToSuperview().offset(-15)
            make.centerY.equalToSuperview()
            make.width.equalTo(7.autoWidth())
            make.height.equalTo(12.autoWidth())
        }
        title.snp.makeConstraints { (make) in
            make.left.equalToSuperview().offset(40)
            make.centerY.equalToSuperview()
            make.height.equalTo(18.autoWidth())
        }
        content.snp.makeConstraints { (make) in
            make.right.equalToSuperview().offset(-25)
            make.centerY.equalToSuperview()
            make.height.equalTo(15.autoWidth())
        }
    }

}
